<?php
function displayResult($result, $columns)
{
?>
		<div class="tableContainer">
		<table class="tableQueryCenter">
		<tr>
		<?php
			for($i=0; $i < sizeof($columns); $i++)
			{
				echo "<th>".$columns[$i]."</th>";
			}
			
		?>
		</tr>
		
		<?php
		foreach ($result as $row) {
			echo "<tr>";
			for($i=0; $i < sizeof($columns); $i++)
			{
				echo "<td>".$row[$columns[$i]]."</td>\n";
			}
			echo "</tr>";
		}
		
		?>
		</table>
		</div>



<?php
}

function displayVerticalResult($result, $columns)
{
?>
		<div class="tableContainer">
		<table class="tableQueryCenter">
		<tr>
			<th>Nom</th>
			<th>Valeur</th>
		</tr>
		<?php
		foreach ($result as $row) {
			for($i=0; $i < sizeof($columns); $i++)
			{
				echo "<tr>";
				echo "<td>".$columns[$i]."</td>\n";
				echo "<td>".$row[$columns[$i]]."</td>\n";
				echo "</tr>";
			}	
		}
		?>
		</table>
		</div>



<?php
}


?>